package com.moyuaninfo.service;

import com.moyuaninfo.entity.MyyRiverInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.moyuaninfo.repository.MyyRiverInfoRepository;

import java.util.Optional;

/**
 * @author 邱祥霸
 * @date 2020/4/8
 */
@Component
public class MyyRiverInfoManger {
    @Autowired
    private MyyRiverInfoRepository myyRiverInfoRepository;

    public MyyRiverInfo findMyyRiverInfo(Long id) {
        Optional<MyyRiverInfo> optional = myyRiverInfoRepository.findById(id);

        return optional.get();
    }
}
